﻿DROP TABLE IF EXISTS `open_user_union`;
CREATE TABLE `open_user_union` (
  `union_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `ctype` enum('union','agent') NOT NULL DEFAULT 'union',
  `reg_time` int(10) unsigned NOT NULL DEFAULT '0',
  `act_status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `act_note` varchar(255) NOT NULL DEFAULT '',
  `log_time` int(10) unsigned NOT NULL DEFAULT '0',
  `admin_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`union_id`),
  UNIQUE KEY `ctype` (`ctype`,`user_id`),
  KEY `act_status` (`act_status`),
  KEY `admin_id` (`admin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;